<?php
class Game_getServersBy {

	function getServersBy($game, $platform) {

		$gameinfoConf = MooObj::get('Game')->getGameConf();
		$serverNum = $gameinfoConf[$game]['serverNum'][$platform];
		
		$pageNums = 5;
		$pages = $serverNum / $pageNums;
		$yushu = $serverNum % $pageNums;
		if ($yushu > 0) {
			$pages = $pages + 1;
		}
		
		$pageNameArr = array();
		for($i = 1; $i <= $pages; $i ++) {
			$minServer = (($i-1)  * $pageNums + 1);
			$maxServer = $i * $pageNums;
			if($maxServer > $serverNum) {
				$maxServer = $serverNum;
			}
			$pageName = $minServer . "-" . 	$maxServer;
			$pageNameArr[] = $pageName;
		}
		return $pageNameArr;
	}
}